<template>
	<view>
		<TopHead :title="'用户协议'"></TopHead>
		<view class="conbox">
			<view class="title1" @click="phoneCall">
				客服电话 <text>023-62433333</text>
			</view>
			<view class="title2">
				在线客服 <uni-icons class="right" type="right" size="20"></uni-icons>
				<button open-type="contact"></button>
			</view>
		</view>
	</view>
</template>

<script>
	import TopHead from '../../components/topHead/topHead.vue';
	export default {
		components: {
			TopHead
		},
		data() {
			return {



			}
		},
		onLoad() {

		},
		onShow() {

			// this.initData()
		},
		onReachBottom() {
			// 触底分页
			console.log('触底')
			// if (this.total > this.list.length) {
			// 	this.page = parseInt(this.page) + 1
			// }
		},
		methods: {
			// 数据请求示例
			initData() {
				let _this = this;
				_this.$http.fetchData({
					url: '/api/biaoduan',
					method: 'GET',
					data: {},
					success(res) {
						// uni.showToast({
						// 	title: res.message,
						// 	icon: 'none'
						// });
						_this.list = [..._this.list, ...res.data]
						this.total = res.total
						let listData = res.data
						if (res.total == 1) {
							let id = listData[0].id
							let total = this.total
							let paramsStr = `?biaoduan_id=${id}&biaoduanTotal=${total}`
							uni.redirectTo({
								url: `/pages/procedureList/procedureList${paramsStr}`
							})
						}
					}
				})
			},
			// dianhua
			phoneCall(item) {
				uni.makePhoneCall({
					phoneNumber: '023-62433333' //仅为示例
				});
			},


		}
	}
</script>

<style scoped>
	.headBox {
		font-size: 36rpx;
		font-family: Microsoft YaHei, Microsoft YaHei-Bold;
		font-weight: 700;
		text-align: center;
		color: #232323;
		padding-top: 88rpx;
		padding-left: 30rpx;
		padding-right: 30rpx;
		padding-bottom: 112rpx;
		background: linear-gradient(89deg, #f9d7a6 1%, #ffdc95 100%);
	}

	.headBox .wzText {
		line-height: 56rpx;
	}

	.conbox {
		padding: 30rpx;
		padding-top: 240rpx;
	}

	.title1 {
		font-size: 28rpx;
		font-family: Microsoft YaHei, Microsoft YaHei-Bold;
		font-weight: 700;
		color: #5d4529;
		padding-bottom: 50rpx;
		border-bottom: 2rpx solid rgba(94, 94, 94, 0.1);
	}

	.title1 text {
		font-size: 28rpx;
		font-family: Microsoft YaHei, Microsoft YaHei-Regular;
		font-weight: 400;
		color: #5d4529;
		margin-left: 94rpx;

	}

	.title2 {
		font-size: 28rpx;
		font-family: Microsoft YaHei, Microsoft YaHei-Bold;
		font-weight: 700;
		border-bottom: 2rpx solid rgba(94, 94, 94, 0.1);
		padding: 50rpx 0;
		color: #5d4529;
		position: relative;
	}

	.title2 button {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		opacity: 0;
		z-index: 2;
	}

	.title2 .right {
		position: absolute;
		right: 0;
		top: 50%;
		margin-top: -20rpx;
	}
</style>